class Person {
  name: string;
  age: number;

  constructor(name: string, age: number) {
    this.name = name;
    this.age = age;
  }

  eating() {
    console.log("eating");
  }
}

class Student extends Person {
  sno: number;

  constructor(name: string, age: number, sno: number) {
    super(name, age);
    this.sno = sno;
  }

  studying() {
    console.log("studying");
  }
}

const stu = new Student("why", 18, 111);
stu.name = "coderwhy";
stu.age = 18;
console.log(stu.name);
console.log(stu.age);
stu.eating();

export {};
